#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
故障管理系统后端启动脚本
"""

import sys
import os

# 添加项目根目录到Python路径
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

# 修改导入路径
from backend.main import app
import uvicorn

if __name__ == "__main__":
    print("正在启动故障管理系统后端服务...")
    print("访问地址: http://localhost:8000")
    print("API文档: http://localhost:8000/docs")
    
    uvicorn.run(
        "backend.main:app",
        host="0.0.0.0",
        port=8000,
        reload=True,
        reload_dirs=["backend"]
    )